package cn.edu.nju.software.greencreditsystem.domain;

import java.sql.Date;
import javax.persistence.*;

/**
 * 作者：何启睿
 * 创建时间：2011-8-21
 * 类描述：环境警告实体类
 */

@Entity
@Table(name="environment_warning")
public class EnvironmentWarning
{
    private int id;
    private Enterprise enterprise;
    private Date date;
    private boolean enterpriseReaded;
    private boolean bankReaded;
    private WarningTemplate warningTemplate;
    private EnvironmentWarningType type;

    
    @Id
    @GeneratedValue
    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    @ManyToOne
    public Enterprise getEnterprise()
    {
        return enterprise;
    }

    public void setEnterprise(Enterprise enterprise)
    {
        this.enterprise = enterprise;
    }

    @Column(name="_date")
    public Date getDate()
    {
        return date;
    }

    public void setDate(Date date)
    {
        this.date = date;
    }

    @Column(name="enterprise_readed")
    public boolean getEnterpriseReaded()
    {
        return enterpriseReaded;
    }

    public void setEnterpriseReaded(boolean enterpriseReaded)
    {
        this.enterpriseReaded = enterpriseReaded;
    }

    @Column(name="bank_readed")
    public boolean getBankReaded()
    {
        return bankReaded;
    }

    public void setBankReaded(boolean bankReaded)
    {
        this.bankReaded = bankReaded;
    }

    @ManyToOne
    public WarningTemplate getWarningTemplate()
    {
        return warningTemplate;
    }

    public void setWarningTemplate(WarningTemplate warningTemplate)
    {
        this.warningTemplate = warningTemplate;
    }

    @OneToOne
    public EnvironmentWarningType getType()
    {
        return type;
    }

    public void setType(EnvironmentWarningType type)
    {
        this.type = type;
    }
}
